/**
 * 数据字典
 * @param value
 */
const dictFunc = (value, code, dataArr) => {
    let result = {};
    dataArr.some((obj) => {
        if (obj.code === code) {
            result = obj;
        }
    });
    return typeof result['val'] === 'undefined' ? value.toString() : (code === 'ENABLED' ? result['val'][value ? '_0' : '_1'] : result['val'][value]);
};

export default dictFunc;